Master Calendar

In order to complete the master calendar, you need two scripts.


We have provided the script used to generate the master calendar  as a data file that you can download to replicate it.


The second script is down below  in step 6. (This script has to be inserted in the  main part of the data load editor)


1- Open the data Load editor .


2- Create new section then name it Master Calendar.


3- Copy and paste the script in the body .




4- This gif is just to help with best practice 



5- Still in the Data Load editor, click on Main


6- Then in the body paste the following script 


LOAD

    "Row ID",

    "Order ID",

    "Order Date",

    "Ship Date",

    "Ship Mode",

    "Customer ID",

    "Customer Name",

    Segment,

    "Postal Code",

    City,

    State,

    Country,

    Region,

    Market,

    "Product ID",

    Category,

    "Sub-Category",

    "Product Name",

    Sales,

    Quantity,

    Discount,

    Profit,

    "Shipping Cost",

    "Order Priority"

FROM [lib://Desktop/global_superstore_2016.xlsx]

(ooxml, embedded labels, table is Orders);


LOAD

    Returned,

    "Order ID",

    Region as ReturnedRegion

FROM [lib://Desktop/global_superstore_2016.xlsx]

(ooxml, embedded labels, table is Returns);


LOAD

    Person,

    Region

FROM [lib://Desktop/global_superstore_2016.xlsx]

(ooxml, embedded labels, table is People);





7- Save your work


8- Reload your data

9-  Go to your data model viewer